home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / tsbat45.zip / DOSTRICK.TXT < prev    next >
Text File  |  1994-05-31  |  6KB  |  148 lines

  1. Assorted MsDos Tricks                                Tue 31-May-94
  2. =====================
  3.                                                All rights reserved
  4.                                   Copyright (c) 1994 by Timo Salmi
  5.  
  6. ..................................................................
  7. Prof. Timo Salmi      Co-moderator of comp.archives.msdos.announce
  8. Moderating at garbo.uwasa.fi anonymous FTP  archives  128.214.87.1
  9. Faculty of Accounting & Industrial Management; University of Vaasa
  10. Internet: ts@uwasa.fi   BBS +(358)-61-3170972; FIN-65101,  Finland
  11. ..................................................................
  12.  
  13.   ┌───────────────────────────────────────────────────────────┐
  14.   │ This file belongs to TSBAT*.ZIP. Please do not distribute │
  15.   │ this dostrick.txt file separately!                        │
  16.   └───────────────────────────────────────────────────────────┘
  17.  
  18. You are free to quote brief passages from this file provided you
  19. clearly indicate the source with a proper acknowledgment.
  20.  
  21. Comments and corrections are solicited. But if you wish to have
  22. individual MsDos usage consultation, please rather post your
  23. question to a UseNet newsgroup like comp.os.msdos.misc. It is much
  24. more efficient than asking me by email. I'd like to help, but I am
  25. very pressed for time. I prefer to pick the questions I answer from
  26. the Usenet news. Thus I can answer publicly at one go if I happen to
  27. have an answer. Besides, newsgroups have a number of readers who
  28. might know a better or an alternative answer. Don't be discouraged,
  29. though, if you get a reply like this from me. I am always glad to
  30. hear from fellow MsDos users.
  31.  
  32.  
  33. INDEX
  34. =====
  35.  
  36. 1) Disabling MsDos commands
  37. 2) Simulating disk partitioning
  38. 3) A config.sys and autoexec.bat example
  39.  
  40.  
  41. 1. Disabling MsDos commands
  42. ===========================
  43.  
  44. You may wish to disable certain MsDos commands for security reasons
  45. to prevent them from being used either accidentally or deliberately.
  46. If you have a command line editor, like doskey, then the disabling
  47. is rather straigtforward.  All you have to do is to create a macro
  48. with the same name as the MsDos command. Consider the following
  49. examples. The first example disables the internal MsDos date command
  50. so that the date on your system cannot be changed.
  51.   doskey date=rem date has been disabled
  52. The second example disables the format command.
  53.   doskey format=rem format has been disabled
  54. Note that since format is an external command, that is it is a
  55. program on your disk, not a command in your command.com command
  56. interpreter, you can still invoke it by giving the explicit path to
  57. it like
  58.   c:\dos\format
  59. In fact, since it will be at path, a drive letter will suffice. Of
  60. course it is very easy to ged rid of these redefinitions. In using
  61. doskey, you only have to press alt+F10 to clear the macros.
  62.  
  63. If you use some other command line editor than doskey then the
  64. commands are naturally slightly different.  For example were you to
  65. use CED (garbo.uwasa.fi:/pc/cmdutil/ced10da.zip) the commands would
  66. be
  67.   ced syn date echo date has been disabled
  68. Restoring the date command would be
  69.   ced clear syn date
  70.  
  71.  
  72. 2. Simulating disk partitioning
  73. ===============================
  74.  
  75. Since I have more than one PC at my disposal, I have noticed that it
  76. is very useful to have some common standard on them including
  77. similar disk names. For example I always assume that R: is my
  78. ramdisk. Also I usually have my hard disk partitioned so that I have
  79. a pairly fixed usage for C: D: E: and F:. One of the PCs is an ICL
  80. laptop, with a 120Mb disk all on C: with no partitioning. below is
  81. what I have in my autoexec.bat to have the ram disk reference the
  82. way I want and to simulate the disk partitioning. Note the
  83. importance of the order of the substitute commands because of the
  84. double usage of D, since that is where the ram disk _originally_
  85. resides on my ICL configuration.
  86.   c:\dos\subst r: d:\
  87.   c:\dos\subst d: c:\d
  88.   c:\dos\subst e: c:\e
  89.   c:\dos\subst f: c:\f
  90.  
  91.  
  92. 3. A config.sys and autoexec.bat example
  93. ========================================
  94.  
  95. There always is something to learn from looking at the other users'
  96. config.sys and autoexec.bat files. Here are mine from my office 486
  97. with MsDos 5.0.  I have added some comments for you.
  98.  
  99. DEVICE=C:\DOS\SETVER.EXE
  100. DEVICE=C:\DOS\HIMEM.SYS
  101. DOS=UMB
  102. device=c:\dos\emm386.exe /noems /i=e000-efff /x=d200-d600
  103. dos=high
  104. COUNTRY=032,,C:\DOS\COUNTRY.SYS
  105. FILES=30
  106. devicehigh=c:\dos\ramdrive.sys 7000 128 256 /e
  107. rem ZANSI.SYS is from garbo.uwasa.fi:/pc/screen/zansi12.zip
  108. devicehigh=c:\sys\zansi.sys
  109. rem Define a bigger environment size
  110. shell=c:\command.com /p /e:1024
  111. lastdrive=z
  112.  
  113. @ECHO OFF
  114. rem Description: My normal MsDos 5.0 boot with Scrollit
  115. rem Note below the trick to identify which of my PCs I am using:
  116. set pcid_=karvi
  117. rem Yellow text on black background
  118. echo <ESC>[40;33;1m
  119. PATH C:\DOS;c:\tools;e:\arczip
  120. rem DAILY.EXE is from /pc/ts/tsbat45.bat to run a mini-backup
  121. rem call c:\bat\daily c:\tools\pkzip -u d:\root\root c:\*.*
  122. PROMPT $p$g
  123. rem CHKSUM is from /pc/goldies/chksum16.zip
  124. c:\tools\chksum command.com 49024 io.sys 9850 msdos.sys 5750
  125. loadhigh c:\dos\KEYB SU,,C:\DOS\KEYBOARD.SYS
  126. rem The Command line EDitor is from /pc/goldies/ced.zip
  127. loadhigh c:\tools\ced -B384,128,768,128,128 -Fced.cfg
  128. rem The TSR memory management until is from /pc/memutil/tsrcom35.zip
  129. c:\tools\mark scrollit
  130. rem The screen scrollback buffer is from /pc/screen/scrlit18.zip
  131. loadhigh c:\tools\scrollit /n=myname /k=myid 60
  132. rem The Snipper screen capture is from /pc/goldies/snippr24.zip
  133. loadhigh c:\tools\snipper
  134. rem The cut and paste utility is from /pc/pcmag/vol11n07.zip
  135. loadhigh c:\tools\dosclip2
  136. rem The CapsLock fix is from /pc/ts/tstsr19.zip
  137. loadhigh c:\tuki\shftcaps
  138. c:\dos\subst r: j:\
  139. mkdir r:\cmand
  140. copy c:\command.com r:\cmand
  141. c:\dos\attrib +r r:\cmand\command.com
  142. set comspec=r:\cmand\command.com
  143. set temp=r:\cmand
  144. c:\dos\mode con: rate=32 delay=1
  145. rem The clock comparison check is from /pc/ts/tsutil39.zip
  146. c:\tools\dtetimal 1994
  147. r:
  148.